<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('result')}">
	<a href="#" onclick="pp('study/showReportFinalTestResult.sgt?offeringId=${offering.id}')">${i18n.getMessage('report')}</a>
	- <a href="#" onclick="pp('study/showReportAllFinalTestResult.sgt?offeringId=${offering.id}')">Report All</a>
	- <a href="#" onclick="cc('study/showListMidtermTest.sgt?offeringId=${offering.id}')">${i18n.getMessage('midtermTest')}</a>
	- <a href="#" onclick="cc('study/showListFinalTest.sgt?offeringId=${offering.id}')">${i18n.getMessage('finalTest')}</a>
	- <a href="#" onclick="cc('study/showListCambridgeTest.sgt?offeringId=${offering.id}')">${i18n.getMessage('cambridge')}</a>
	- <a href="#" onclick="cc('study/showListMakeUpTest.sgt?offeringId=${offering.id}')">${i18n.getMessage('makeUpTest')}</a>
	- <a href="#" onclick="pp('study/showScoreReport.sgt?offeringId=${offering.id}')">Score Report</a>
	- <a href="#" onclick="pp('study/showCertificate.sgt?offeringId=${offering.id}')">${i18n.getMessage('certificate')}</a>
	- <a href="#" onclick="pp('study/doFinalTestResultChart.sgt?offeringId=${offering.id}')">Chart</a>
	- <a href="#" onclick="cc('offering/showInfoOffering.sgt?id=${offering.id}')">${i18n.getMessage('offering')}</a>
</@showTitle>

<br/>

<div style="overflow:auto">

<table border="1" cellspacing="0" cellpadding=0" style="width:120%">
	<tr style="text-align:center; font-weight:bold; background-color:#04aa9c; color:#FFF; font-size: 11px; padding:2px">
		<td rowspan="3" style="text-align:center; width:20px">${i18n.getMessage('ordinalNumber')}</td>
		<td rowspan="3" colspan="2">Student's Name</td>
		<td rowspan="3">Date of Birth</td>
		<td colspan="2">Attendance (10%)</td>
		<td colspan="2">Midterm Exam (30%)</td>
		<td colspan="4">Final Exam (60%)</td>
		<td rowspan="3">Final Score <br/> (100%)</td>
		<td rowspan="3">Rank</td>
	</tr>
	<tr style="text-align:center; font-weight:bold; background-color:#04aa9c; color:#FFF; font-size: 11px; padding:2px">
		<td rowspan="2">Raw Score <br/> (100)</td>
		<td rowspan="2">Converted <br/> Score</td>
		<td rowspan="2">Raw Score <br/> (100)</td>
		<td rowspan="2">Converted <br/> Score</td>
		<td colspan="2">Written (40%)</td>
		<td colspan="2">Oral (20%)</td>
	</tr>
	<tr style="text-align:center; font-weight:bold; background-color:#04aa9c; color:#FFF; font-size: 11px; padding:2px">
		<td>Raw Score <br/> (100)</td>
		<td>Converted <br/> Score</td>
		<td>Raw Score <br/> (100)</td>
		<td>Converted <br/> Score</td>
	</tr>
	
	<#list offeringMembers as member>
		<tr <#if ((member_index % 2) = 0)>style="background-color:#DEDEDE"<#else>style="background-color:#FFF"</#if>>
			<td style="text-align:center; border: solid 1px #FFF; padding-left:3px">${(member_index + 1)!}</td>
			<td style="width:110px;border: solid 1px #FFF; padding-left:3px"><span <#if (!member.active)>style="text-decoration: line-through"</#if>>${(member.receipt.student.lastName)!}</span></td>
			<td style="width:50px;border: solid 1px #FFF; padding-left:3px"><span <#if (!member.active)>style="text-decoration: line-through"</#if>>${(member.receipt.student.firstName)!}</span></td>
			<td style="width:75px;border:solid 1px #FFF;text-align:center;padding-left:3px">${(member.receipt.student.dateOfBirth?date)!}</td>
			<td style="width:60px;text-align:center;border:solid 1px #FFF;padding-left:3px">${(member.attendanceScore)!}</td>
			<td style="width:60px;border:solid 1px #FFF;text-align:center;padding-left:3px">${(member.convertedAttendanceScore)!}</td>
			<td style="width:60px;border:solid 1px #FFF;text-align:center;padding-left:3px">${(member.midtermTest.total)!}</td>
			<td style="width:60px;border:solid 1px #FFF;text-align:center;padding-left:3px">${(member.midtermTest.convertedScore)!}</td>
			<td style="width:60px;border:solid 1px #FFF;text-align:center;padding-left:3px">${(member.finalTest.writtenScore)!}</td>
			<td style="width:60px;border:solid 1px #FFF;text-align:center;padding-left:3px">${(member.finalTest.convertedWrittenScore)!}</td>
			<td style="width:60px;border:solid 1px #FFF;text-align:center;padding-left:3px">${(member.finalTest.oralScore)!}</td>
			<td style="width:60px;border:solid 1px #FFF;text-align:center;padding-left:3px">${(member.finalTest.convertedOralScore)!}</td>
			<td style="width:60px;border:solid 1px #FFF;text-align:center;padding-left:3px">${(member.totalScore)!}</td>
			<td style="width:60px;border:solid 1px #FFF;text-align:center;padding-left:3px">${(member.grade)!}</td>
		</tr>
	</#list>
</table>

</div>


<br/>